package com.zk.fm.util;

import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;

public class VersionCheckUtil {

	public static String getAppVersionName(Context context) {
		String versionName = null;
		try {
			PackageInfo pkg = context.getPackageManager().getPackageInfo(
					context.getPackageName(), 0);
			versionName = pkg.versionName;
		} catch (NameNotFoundException e) {
			e.printStackTrace();
		}
		return versionName;
	}
}
